<% use crate::utils::urls; %>
<turbo-frame id="deployment">
  <section>
    <h1><span class="material-symbols-outlined">inventory</span>Deployment
      <% if deployment.active.unwrap() { %>
        <span class="material-symbols-outlined success">star</span>
      <% } else { %>
        <span class="material-symbols-outlined">cancel</span>
      <% } %>
    </h1>
  
    <dl>
      <dt>Project</dt>
      <dd><a href="<%- urls::deployment_project_by_id(project.id) %>" data-turbo="false"><%= project.name %></a></dd>
      <dt>Model</dt>
      <dd><a href="<%- urls::deployment_model_by_id(model.id) %>" data-turbo="false"><%= model.algorithm %></a></dd>
      <dt>Reason</dt>
      <dd><%= deployment.human_readable_strategy() %></dd>
      <dt>Deployed</dt>
      <dd><time datetime="<% deployment.created_at; %>"><% deployment.created_at; %></time></dd>
    </dl>
  </section>
</turbo-frame>
